import PropTypes from 'prop-types'
import React, { memo } from 'react'

import { CustomTitleWarpper } from './style'
const index = memo((props) => {
    const { title, type = "line" } = props
    return (
        <CustomTitleWarpper>
            <div className="header">
                {type === 'line' && <span className='line'></span>}
                {type === 'dot' && <span className='dot'></span>}
                {title}
            </div>

        </CustomTitleWarpper>
    )
})

index.propTypes = {
    title: PropTypes.string
}

export default index